import { CustomRepositoryDecorator } from "src/database/decorator/repository.decorator";
import { UserEntity } from "./entity/user.entity";
import { BaseRepository } from "src/database/base/base.repository";

@CustomRepositoryDecorator(UserEntity)
export class UserRepository extends BaseRepository<UserEntity> {
    protected _qbName = 'user';

    buildBaseQuery() {
        return this.createQueryBuilder(this.qbName).orderBy(`${this.qbName}.createdAt`, 'DESC');
    }
}